<?php
/**
 * Unfuddle Person Model
 * Users are represented in the Unfuddle API by the "Person" data model. This
 * class contains the properties that make up a "Person".
 *
 * @package     Unfuddle
 * @subpackage  Data Models
 * @author      Luke Visinoni <luke.visinoni@gmail.com>
 * @copyright   (c) 2010 Luke Visinoni <luke.visinoni@gmail.com>
 * @version     $Id: Person.php 27 2011-01-15 10:33:26Z luke.visinoni $
 */
class Unfuddle_Model_Person extends Unfuddle_Model_Abstract {

    protected $_name = 'person';
    
    protected $_fields = array(
        'access-key' => array('type' => 'text', 'required' => false, 'read-only' => true),
        'account-id' => array('type' => 'integer', 'required' => false, 'read-only' => true),
        'created-at' => array('type' => 'datetime', 'required' => false, 'read-only' => true),
        'email' => array('type' => 'text', 'required' => false, 'read-only' => false),
        'first-name' => array('type' => 'text', 'required' => false, 'read-only' => false),
        'id' => array('type' => 'integer', 'required' => false, 'read-only' => true),
        'is-administrator' => array('type' => 'boolean', 'required' => false, 'read-only' => false),
        'is-removed' => array('type' => 'boolean', 'required' => false, 'read-only' => false),
        'last-name' => array('type' => 'text', 'required' => false, 'read-only' => false),
        'last-signed-in' => array('type' => 'datetime', 'required' => false, 'read-only' => true),
        'last-signed-in-formatted' => array('type' => 'datetime', 'required' => false, 'read-only' => true), // This field is not available unless formatted=true is passed thru GET
        'notification-frequency' => array('type' => 'set', 'required' => false, 'read-only' => false, 'set' => array('immediate', '30mins', 'hourly', 'dailyam', 'dailypm', 'never')),
        'notification-ignore-self' => array('type' => 'boolean', 'required' => false, 'read-only' => false),
        'notification-last-sent' => array('type' => 'datetime', 'required' => false, 'read-only' => false),
        'notification-scope-messages' => array('type' => 'set', 'required' => false, 'read-only' => false, 'set' => array('all', 'none')),
        'notification-scope-milestones' => array('type' => 'set', 'required' => false, 'read-only' => false, 'set' => array('all', 'none')),
        'notification-scope-source' => array('type' => 'set', 'required' => false, 'read-only' => false, 'set' => array('all', 'none')),
        'notification-scope-tickets' => array('type' => 'set', 'required' => false, 'read-only' => false, 'set' => array('all', 'involved', 'none')),
        'show-help-messages' => array('type' => 'boolean', 'required' => false, 'read-only' => false),
        'text-markup' => array('type' => 'set', 'required' => false, 'read-only' => false, 'set' => array('markdown', 'textile', 'plain')),
        'time-zone' => array('type' => 'text', 'required' => false, 'read-only' => false),
        'updated-at' => array('type' => 'datetime', 'required' => false, 'read-only' => true),
        'username' => array('type' => 'text', 'required' => false, 'read-only' => false),
        
        // not in docs...
        'identity-url' => array('type' => 'text', 'required' => false, 'read-only' => false),
        'notification-scope-notebooks' => array('type' => 'set', 'required' => false, 'read-only' => false, 'set' => array('all', 'none')),
    );

}